@extends('_layout.master')

@section('right')
    <div class="col-md-9">
        <div class="row border1">
            <div class="col-md-5">
                <span class="list-icon pull-left"></span>
                <h4 style="color: #ff6637;" class="pull-left">产品搜索列表</h4>
            </div>
        </div>
        <div class="row">
            @forelse($products as $product)
                <div class="media">
                    <div class="media-left">
                        <a href="{{ route('productContent', ['id' => $product->id]) }}">
                            <img class="media-object" src="{{ asset('upload/'.$product->pictures[0]) }}" alt="">
                        </a>
                    </div>
                    <div class="media-body">
                        <h4 class="media-heading">{{ $product->name }}</h4>
                        {{ $product->summary }}
                    </div>
                </div>
            @empty
                <div class="row text-center">
                    <h5 style="color: #aaaaaa;">未搜索到任何产品</h5>
                </div>
            @endforelse
        </div>
        <div class="row text-right" style="margin-top: 30px;">
            {{ $products->links() }}
        </div>
    </div>
@endsection